
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
<h:head>
<title>BeerAir</title>
<link href="./css/bootstrap.css" 
      rel="stylesheet" type="text/css"/> 
    <link href="./css/styles.css" 
      rel="stylesheet" type="text/css"/> 
</h:head>
<h:body>
<h:graphicImage id="airplane" value="./images/airplane.jpg"/>
<div id="header"></div>
<div id="container" >	
	<div id="navbar">
		<h:form>  
			<p:menubar >  
				<p:menuitem value="Flights"/>  
				<p:menuitem value="Offers"/>  
				<p:menuitem value="My Booking"/>  
				<p:menuitem value="About"/>  
     			<p:menuitem value="FAQ"/>  
    		    <f:facet name="options">  
     		       <p:inputText style="margin-right:10px"/>  
     		       <p:commandButton type="button" value="Search"/>  
     		   </f:facet>  
   			</p:menubar>  
		</h:form>  	
	</div>
	<div id="content">
		<h:form class="mainform">
			<h1>Timetable</h1><br/>
    		<div id="departuretimetable">
    			<h3>Departure</h3>
    			 
    				<p:dataTable var="flight" value="#{timetableView.getTimesFromAirDate(homeView)}">  
        				<p:column headerText="Monday" >
        					<h:outputText value="#{flight.departureTime}" /><br/>
        					<h:outputText value="#{flight.travelPrice}" />
        				</p:column>  
  						<p:column headerText="Tuesday"></p:column>  
      					<p:column headerText="Wednesday"></p:column>  
       					<p:column headerText="Thursday"></p:column>  
       					<p:column headerText="Friday"></p:column>  
       					<p:column headerText="Saturday"></p:column>  
       					<p:column headerText="Sunday"></p:column>  
   					</p:dataTable>  
    		</div><br/>
    		<div id="arrivaltimetable">
    			<h3>Arrival</h3>
    				<p:dataTable>  
        				<p:column headerText="Monday"></p:column>  
  						<p:column headerText="Tuesday"></p:column>  
      					<p:column headerText="Wednesday"></p:column>  
       					<p:column headerText="Thursday"></p:column>  
        				<p:column headerText="Friday"></p:column>  
       					<p:column headerText="Saturday"></p:column>  
       					<p:column headerText="Sunday"></p:column>  
   					</p:dataTable>  
    		</div>
    		<br/><br/>
			<h:commandButton class="submit" value="Next" action="#{timetableView.showOffers}"/>
			<h:commandButton class="submit" value="Back" action="#{timetableView.showHome}"/>
		</h:form>	
	</div>
	<div id="aside">
		<div id="recap">
			<h3>Summary</h3>
			<p><b>Departure Airport</b>: #{homeView.depAirport}</p>
			<p><b>Arrival Airport</b>: #{homeView.arrAirport}</p>
			<p><b>One-Way</b>: #{homeView.oneWay}</p>
			<p><b>Departure Date</b>: #{homeView.dateToString(homeView.depDate)}</p>
			<p><b>Return Date</b>: #{homeView.dateToString(homeView.retDate)}</p>
			<p><b>Adults</b>: #{homeView.adult}</p>
			<p><b>Children(&#60; 16)</b>: #{homeView.child}</p>
			<p><b>Infants(&#60; 2)</b>: #{homeView.infant}</p>
		</div>
	</div>
</div>
<div id="footer"></div>
</h:body>
</html>